package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.VResultsContactApplicationMapper;
import com.ruoyi.system.domain.VResultsContactApplication;
import com.ruoyi.system.service.IVResultsContactApplicationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 问题数据查询Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-14
 */
@Service
public class VResultsContactApplicationServiceImpl implements IVResultsContactApplicationService 
{
    @Autowired
    private VResultsContactApplicationMapper vResultsContactApplicationMapper;

    /**
     * 查询问题数据查询
     * 
     * @param courseId 问题数据查询主键
     * @return 问题数据查询
     */
    @Override
    public VResultsContactApplication selectVResultsContactApplicationByCourseId(Long courseId)
    {
        return vResultsContactApplicationMapper.selectVResultsContactApplicationByCourseId(courseId);
    }

    /**
     * 查询问题数据查询列表
     * 
     * @param vResultsContactApplication 问题数据查询
     * @return 问题数据查询
     */
    @Override
    public List<VResultsContactApplication> selectVResultsContactApplicationList(VResultsContactApplication vResultsContactApplication)
    {
        return vResultsContactApplicationMapper.selectVResultsContactApplicationList(vResultsContactApplication);
    }

    /**
     * 新增问题数据查询
     * 
     * @param vResultsContactApplication 问题数据查询
     * @return 结果
     */
    @Override
    public int insertVResultsContactApplication(VResultsContactApplication vResultsContactApplication)
    {
        vResultsContactApplication.setCreateTime(DateUtils.getNowDate());
        return vResultsContactApplicationMapper.insertVResultsContactApplication(vResultsContactApplication);
    }

    /**
     * 修改问题数据查询
     * 
     * @param vResultsContactApplication 问题数据查询
     * @return 结果
     */
    @Override
    public int updateVResultsContactApplication(VResultsContactApplication vResultsContactApplication)
    {
        vResultsContactApplication.setUpdateTime(DateUtils.getNowDate());
        return vResultsContactApplicationMapper.updateVResultsContactApplication(vResultsContactApplication);
    }

    /**
     * 批量删除问题数据查询
     * 
     * @param courseIds 需要删除的问题数据查询主键
     * @return 结果
     */
    @Override
    public int deleteVResultsContactApplicationByCourseIds(String courseIds)
    {
        return vResultsContactApplicationMapper.deleteVResultsContactApplicationByCourseIds(Convert.toStrArray(courseIds));
    }

    /**
     * 删除问题数据查询信息
     * 
     * @param courseId 问题数据查询主键
     * @return 结果
     */
    @Override
    public int deleteVResultsContactApplicationByCourseId(Long courseId)
    {
        return vResultsContactApplicationMapper.deleteVResultsContactApplicationByCourseId(courseId);
    }
}
